/*
 * Created on 30.01.2004
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package ro.qi.framework.sys.security.entities;

import ro.qi.framework.sys.entities.Entity;

/**
 * @author Denverash
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class SecurityAccountRoleACLCollection extends Entity {

	public SecurityAccountRoleACLCollection() {
		super();
	}

	public SecurityAccountRoleACLCollection(int accountId) {
		super();
		setAccountId(accountId);
		select();
	}

	public void setAccountId(int value) {
		setValue("accountId", value);
	}

	public int getCollectionSize() {
		return getCollectionSize("accountRoles");
	}

	public int getRoleId(int index) {
		return getCollectionIntValue("accountRoles", "roleId", index);
	}

	public SecurityApplicationRole getApplication(int index) {
		return new SecurityApplicationRole(getRoleId(index));
	}

}
